<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$tpl_info = (object) Array(
	'show_name'=>'默认',
	'author'=>'宁秀娟',
	'profile'=>'默认',
	'create_time'=> '2012-05-21'
);

if ( ! function_exists('menu'))
{
	function menu($show_name,$max_level,$description = null,$types = null)
	{
		$menu = new stdClass(); 
		$menu->show_name = $show_name;
		$menu->max_level = $max_level;
		$menu->description = $description == null?$menu->show_name:$description;
		if($types == null)
		{
			$types = array(
				Menu_Item_Type::Link,
				Menu_Item_Type::Page,
				Menu_Item_Type::Article_Class
			);
		}
		$menu->types = $types; 
		return $menu;
	}
}  

if ( ! function_exists('menus'))
{
	function menus()
	{
		return Array(
			'main'=>menu('主菜单',2,'主菜单，页面头部的主导航菜单') 
			// 'friend_link'=>menu('友情链接',2,'链接，页面头部的主导航菜单',array('link'))
	 	);    
	}
}
